package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 广告信息
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_advertisement")
public class Advertisement extends Model<Advertisement> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "advertisement_id", type = IdType.ASSIGN_ID)
    private String advertisementId;
    /**
     * 标题
     */
    @TableField("title")
    private String title;
    /**
     * 宣传图片
     */
    @TableField("pic")
    private String pic;
    /**
     * 跳转地址
     */
    @TableField("jump_url")
    private String jumpUrl;
    /**
     * 跳转参数
     */
    @TableField("jump_param")
    private String jumpParam;
    /**
     * 背景颜色
     */
    @TableField("bg_color")
    private String bgColor;
    /**
     * 排序
     */
    @TableField("idx")
    private Integer idx;
    /**
     * APPID
     */
    @TableField("appid")
    private String appid;
    /**
     * 添加时间
     */
    @TableField("add_time")
    private LocalDateTime addTime;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;
    /**
     * 广告位置
     */
    @TableField("location")
    private String location;
    /**
     * 跳转类型
     */
    @TableField("jump_type")
    private String jumpType;
    /**
     * 是否启用
     */
    @TableField("enable")
    private String enable;

    public void freeData() {
        this.advertisementId = null;
        this.title = null;
        this.pic = null;
        this.jumpUrl = null;
        this.jumpParam = null;
        this.bgColor = null;
        this.idx = null;
        this.appid = null;
        this.addTime = null;
        this.updateTime = null;
        this.location = null;
        this.jumpType = null;
        this.enable = null;
    }

}
